< previous page page_615 next page >

Page 615
Styles of Buttons
You can apply six different styles to a button. Table 30.4 lists each of the different styles and gives an explanation of how each one reacts at runtime.
Table 30.4 Button Object Style Property Settings.
StyleDescription
0-tbrDefaultThis is a normal button that, when pressed, will simply depress, fire the ButtonClick event on the toolbar, and then return to normal unpressed state. Use this for any action that just needs to be performed and is then complete.
1-tbrCheckThis button acts like a toggle. When you click the button, it stays pressed. You can then click the button again to return it to an unpressed state.
2-tbrButtonGroupYou can create button groups by inserting a separator button (see the next style) and then adding two or more buttons to the toolbar, followed by another separator. When buttons are grouped, they act like option buttons. When you press one button to be selected, the other button in the group will become unselected.
3-SeparatorThis style is used to place some blank space in between buttons. This is used to group common buttons together or to create a button group. The size is determined by the toolbar itself and is approximately one-third the size of a normal button.
4-PlaceHolderThis button is like a separator except its used to place another control on top of the toolbar. If you add a placeholder button, youll set the Width property of this Button object to the width you want for the size of the control you place on top of this placeholder. You might use this to place a combo box on the toolbar, like Microsoft Word does with its selection of fonts and styles. If you use this type of button, you need to write code to handle the resizing of the toolbar at runtime. See the online Help for an example of the code you might write.
5-DropDownIf you choose this style of button, you can insert ButtonMenu objects. A button menu is a menu thats dropped down from a button when clicked. Only one level of menus is allowed. You can then click any of these button menus to invoke the ButtonMenuClick event on the toolbar.

 
< previous page page_615 next page >

If you like this book, buy it!